﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BlogAppExt.Models
{
    /// <summary>
    /// Abstract BlogItem class for either BlogPost or CommentPost
    /// </summary>
    public abstract class BlogItem
    {
        protected static int NextID = 0;
        public string Text { get; set; }
        public string Title { get; set; }
        private int postID;

        public int Id
        {
            get { return postID; }
        }
        protected int userID;

        public int UserId
        {
            get { return userID; }
            
        }
        private DateTime postDate;

        public DateTime PostDate
        {
            get { return postDate; }
        }
        
        protected BlogItem()
        {
            postID = NextID++;
            postDate = new DateTime();
        }
    }
}